package com.aiti.lulian.mapper;

import com.aiti.base.core.base.mapper.SuperMapper;
import com.aiti.lulian.dto.LuLianOfferDto;
import com.aiti.lulian.entity.LuLianOffer;
import com.aiti.lulian.vo.LuLianOfferVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

/**
 * @ClassName ILuLianOfferMapper
 * @Description 报价表dao
 * @Author diaozhende
 * @Date 2024/6/19 0019 10:59
 */
@Repository
public interface ILuLianOfferMapper extends SuperMapper<LuLianOffer> {
    List<LuLianOfferVo> selectOfferListPage(@Param("luLianOfferDto") LuLianOfferDto luLianOfferDto, @Param("offset") Integer offset);

    long selectOfferListPageCount(@Param("luLianOfferDto") LuLianOfferDto luLianOfferDto);

    long selectTotalCount(@Param("offerUserId") String offerUserId);

    long selectSuccessCount(@Param("offerUserId") String offerUserId);

    BigDecimal selectAuccessAmount(@Param("offerUserId") String offerUserId);

    long selectLongTerm(@Param("offerUserId") String offerUserId);

    long selectInValidityPeriodCount(@Param("offerUserId") String offerUserId);

    long selectOfferStatusCount(@Param("offerUserId") String offerUserId, @Param("status") String status);

    boolean updateOfferByBaseId(@Param("luLianOffer") LuLianOffer luLianOffer);

    List<LuLianOfferVo> getRegisteredInquiryDataList(Page<LuLianOffer> page, @Param("userId") String userId);


    List<LuLianOffer> queryOfferListPage(Page<LuLianOffer> page, @Param("luLianOfferDto") LuLianOfferDto luLianOfferDto);
}
